package com.iotechn.unimall.admin.api;

import com.iotechn.unimall.core.annotation.HttpMethod;
import com.iotechn.unimall.core.annotation.HttpOpenApi;
import com.iotechn.unimall.core.annotation.HttpParam;
import com.iotechn.unimall.core.annotation.HttpParamType;
import com.iotechn.unimall.core.annotation.param.NotNull;
import com.iotechn.unimall.core.exception.ServiceException;
import com.iotechn.unimall.data.domain.SalesSendOrderDO;
import com.iotechn.unimall.data.dto.warehouse.SalesSendOrderDTO;
import com.iotechn.unimall.data.model.Page;

/**
 * 出库订单发货表
 *
 * @author wxw
 * @email
 * @date 2020-03-28 22:54:53
 */
@HttpOpenApi(group = "admin.salesSendOrder", description = "")
public interface SalesSendOrderService {

    @HttpMethod(description = "列表", permission = "warehouse:salessendorder:list", permissionParentName = "仓库管理", permissionName = "出库管理")
    Page<SalesSendOrderDO> list(
            @HttpParam(name = "pageNo", type = HttpParamType.COMMON, description = "页码", valueDef = "1") Integer page,
            @HttpParam(name = "limit", type = HttpParamType.COMMON, description = "页长度", valueDef = "20") Integer limit,
            @NotNull @HttpParam(name = "adminId", type = HttpParamType.ADMIN_ID, description = "管理员ID") Long adminId,
            @HttpParam(name = "sendOrderNo", description = "出库单编号") String sendOrderNo,
            @HttpParam(name = "skuSearch", description = "商品搜索") String skuSearch,
            @HttpParam(name = "insertStartTime", description = "出库开始时间") String insertStartTime,
            @HttpParam(name = "insertEndTime", description = "出库结束时间") String insertEndTime,
            @HttpParam(name = "storeId", description = "门店id") Long storeId,
            @HttpParam(name = "sendOrderState", description = "状态") String sendOrderState) throws ServiceException;

    @HttpMethod(description = "创建", permission = "warehouse:salessendorder:create", permissionParentName = "仓库管理", permissionName = "出库管理")
    String create(
            @NotNull @HttpParam(name = "salesSendOrderDTO", type = HttpParamType.COMMON, description = "") SalesSendOrderDTO salesSendOrderDTO,
            @NotNull @HttpParam(name = "adminId", type = HttpParamType.ADMIN_ID, description = "管理员ID") Long adminId) throws ServiceException;

    @HttpMethod(description = "修改", permission = "warehouse:salessendorder:update", permissionParentName = "仓库管理", permissionName = "出库管理")
    String update(
            @NotNull @HttpParam(name = "salesSendOrderDTO", type = HttpParamType.COMMON, description = "") SalesSendOrderDTO salesSendOrderDTO,
            @NotNull @HttpParam(name = "adminId", type = HttpParamType.ADMIN_ID, description = "管理员ID") Long adminId) throws ServiceException;

    @HttpMethod(description = "删除", permission = "warehouse:salessendorder:delete", permissionParentName = "仓库管理", permissionName = "出库管理")
    String delete(
            @NotNull @HttpParam(name = "id", type = HttpParamType.COMMON, description = "删除Id") Long id,
            @NotNull @HttpParam(name = "adminId", type = HttpParamType.ADMIN_ID, description = "管理员ID") Long adminId) throws ServiceException;

    @HttpMethod(description = "详情", permission = "warehouse:salessendorder:detail", permissionParentName = "仓库管理", permissionName = "出库管理")
    SalesSendOrderDTO detail(
            @NotNull @HttpParam(name = "id", type = HttpParamType.COMMON, description = "Id") Long id,
            @NotNull @HttpParam(name = "adminId", type = HttpParamType.ADMIN_ID, description = "管理员ID") Long adminId) throws ServiceException;

    @HttpMethod(description = "审核", permission = "warehouse:salessendorder:audit", permissionParentName = "仓库管理", permissionName = "出库管理")
    String audit(
            @NotNull @HttpParam(name = "salesSendOrderId", description = "出库单ID") Long salesSendOrderId,
            @HttpParam(name = "sendOrderState", description = "出库单状态") Integer sendOrderState,
            @HttpParam(name = "auditComment", description = "审核意见") String auditComment,
            @HttpParam(name = "storePurchaseOrderId", description = "门店要货单id") Long storePurchaseOrderId,
            @HttpParam(name = "storeStockEntryId", description = "门店入库单id") Long storeStockEntryId,
            @NotNull @HttpParam(name = "adminId", type = HttpParamType.ADMIN_ID, description = "管理员ID") Long adminId) throws ServiceException;


}

